package com.zzw.service;

import com.zzw.bean.Admin;
import com.zzw.bean.Msg;
import com.zzw.bean.SysUser;
import com.zzw.bean.TChargeBox;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author 赵志伟
 * @version 1.0
 */
@SuppressWarnings({"all"})
public interface SysUserService {

    public Msg login(SysUser sysUser);

    //获取用户信息
    public SysUser getCurrentUser(Integer userId);

    //注册
    public Msg register(SysUser sysUser);

    //新增
    public Msg add(SysUser sysUser, MultipartFile file);

    public List<SysUser> listByCondition(SysUser sysUser);

    //删除
    public boolean delete(Integer id);

    //修改
    public boolean update(SysUser sysUser);

    //更新用户头像
    public boolean updateAvatar(Integer userId, String avatarUrl);

    // 更新用户信息
    public boolean updateUserInfo(SysUser sysUser);

    // 修改密码
    boolean changePassword(Integer userId, String oldPassword, String newPassword);
    
    /**
     * 根据用户名查找用户
     * @param username 用户名
     * @return 用户对象
     */
    SysUser findByUsername(String username);
    
    /**
     * 获取用户的权限列表
     * @param userId 用户ID
     * @return 权限标识列表
     */
    List<String> getUserPermissions(Integer userId);
}
